/*!
 * smallPop 0.1.2 | https://github.com/silvio-r/spop
 * Copyright (c) 2015 Sílvio Rosa @silvior_
 * MIT license
 */

$spop-bg-color:			#454A56 !default;
$spop-color:			#fff !default;

$spop-info-bg:		   	$spop-bg-color !default;
$spop-info-color:		#3a95ed !default;

$spop-error-bg:			$spop-bg-color !default;
$spop-error-color:		#ff5656 !default;

$spop-success-bg:		$spop-bg-color !default;
$spop-success-color:	#2ecc54 !default;

$spop-warning-bg:		$spop-bg-color !default;
$spop-warning-color:	#fcd000 !default;

$spop-title-color:      #fff !default;
$spop-link-color:       $spop-title-color !default;

$spop-width: 			320px !default;
$spop-font-size-base:   14px;
$spop-space:			0.7em !default;

$spop-animation-duration:	0.4s !default;

$use-box-shadow: 			false !default;
$box-shadow: 				0 0 6px 2px rgba( #000, 0.25) !default;

$use-border-radius:			true !default;
$border-radius: 			2px !default;

$use-icon:                  true;

.spop--info,
.spop--error,
.spop--warning,
.spop--success { color: $spop-color; background-color: $spop-bg-color;}

.spop-container {
    z-index: 2000;
    position: fixed;

    &,
    *,
    *:after,
    *:before { box-sizing: border-box;}
}

.spop--top-left   {
    top: 0;
    left: 0;
    .spop { transform-origin: 0 0;}
}
.spop--top-center {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    .spop { transform-origin: 50% 0;}
}
.spop--top-right  {
    top: 0;
    right: 0;
    .spop { transform-origin: 100% 0;}
}


.spop--center  {
    top: 50%;
    left: 50%;
    transform: translate3d(-50%, -50%, 0);
    .spop { transform-origin: 50% 0;}
}


.spop--bottom-left   {
    bottom: 0;
    left: 0;
    .spop {transform-origin: 0 100%;}
}
.spop--bottom-center {
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    .spop { transform-origin: 50% 100%;}
}
.spop--bottom-right  {
    bottom: 0;
    right: 0;
    .spop { transform-origin: 100% 100%;}
}


@media screen and (max-width:30em) {
    .spop--top-left,
    .spop--top-center,
    .spop--top-right,
    .spop--bottom-left,
    .spop--bottom-center,
    .spop--bottom-right  {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin-left: 0;
        transform: translateX(0);
        .spop { transform-origin: 50% 100%;}
    }

    .spop { border-bottom: 1px solid rgba(#000,0.15);}
}

.spop {
    position: relative;
    min-height: 56px;
    line-height: 1.25;
    font-size: $spop-font-size-base;
    transform: translateZ(0);
    display: flex;
    align-items: center;


    @if $use-box-shadow == true {
        box-shadow: $box-shadow;
    }

    @media screen and (min-width:30rem) {
        @if $use-border-radius == true {
            border-radius: $border-radius;
        }

        width: $spop-width;
        margin: $spop-space;
    }
}

.spop--top-center,
.spop--bottom-center {
    .spop {
        width: 40rem;
        padding-right: 10px;
    }    
}

@keyframes spopIn {
    0%   { transform: scale(0.2,0.2);}
    95%  { transform: scale(1.1,1.1);}
    100% { transform: scale(1,1);}
}
@keyframes spopOut {
    0%   { opacity: 1; transform: scale(1,1);}
    20%  { transform: scale(1.1,1.1);}
    100% { opacity: 0; transform: scale(0,0);}
}

.spop--out {
    animation: spopOut $spop-animation-duration ease-in-out;
}

.spop--in {
    animation: spopIn $spop-animation-duration ease-in-out;
}


.spop-body{
    margin-left: 10px;
    margin-right: 10px;
    margin-top: 10px;
    margin-bottom: 10px;
}

.spop-close {
    height: 32px;
    width: 32px;
    padding-right: 10px;
    font-size: 42px;
    font-weight: bold;
    text-align: right;
    line-height: 0.6;
    color: $spop-color;
    opacity: 0.5;

    &:hover {
        opacity: 0.7;
        cursor: pointer;
    }
}

.spop-icon {
    font-size: 30px;
    margin-left: 10px;

    &.fa-check-circle{
        color: greenyellow;
    }

    &.fa-times{
        color: red;
    }

    &.fa-exclamation{
        color: yellow;
    }
}

